package symbolClass;

import checkClass.TypeExpression;

import java.util.Map;

/*
    符号表节点
    存储和符号相关的属性
    2022-3-11-杨海南
 */
public class SymbolNode {

    private String symbolName;
    private TypeExpression symbolType;
    private boolean isConst;
    //数组维数
    private int arrayDepth;

    public SymbolNode(String symbolName, TypeExpression symbolType, boolean isConst,int arrayDepth) {
        this.symbolName = symbolName;
        this.symbolType = symbolType;
        this.isConst=isConst;
        this.arrayDepth = arrayDepth;
    }

    public String getSymbolName() {
        return symbolName;
    }

    public TypeExpression getSymbolType() {
        return symbolType;
    }

    public int getArrayDepth() {
        return arrayDepth;
    }

    public boolean isConst() {
        return isConst;
    }
}
